import http from "@/http";
//新增数据类型
export type Category ={
    cagegoryId: string;
    categoryName:string;
    orderNum:string;
}
//列表数据类型
export type CateListParm = {
    currentPage: number;
    pageSize: number;
    categoryName: string;
}
//新增
export const addApi = (parm:Category)=>{
    return http.post("/api/notice_category",parm)
}
//编辑
export const editApi = (parm:Category)=>{
    return http.put("/api/notice_category",parm)
}
//删除
export const deleteApi = (cagegoryId:string)=>{
    return http.delete(`/api/notice_category/${cagegoryId}`)
}
//列表
export const getListApi = (parm:CateListParm)=>{
    return http.get("/api/notice_category/list",parm)
}
//公告下拉 
export const getCateListApi = ()=>{
    return http.get("/api/notice_category/select")
}

